package ua.org.oa.ishchenko;

public class Human {
	private String name;
	private int old;
	private double weight;
	
	public int getOld(){
		return old;
	}
	public void setOld(int old){
		if(old > 0 && old < 100){
		this.old = old;
		}
		else
			System.out.println("Your old is invalid");
	}
	
	public double getWeight(){
		return weight;
	}
	public void setWeight(double weight){
		if(weight > 0 && weight < 200){
			this.weight = weight;
		}
		else
			System.out.println("Your weight is invalid");
		}
	
	public Human (String name, int old, double weight) {
		this.name = name;
		setOld(old);
		setWeight(weight);
		
	}
	
	public void sayWhatIsYourName (){
		System.out.println("My name is " + name);
	}
	
	public void sayHowOldAreYou (){
		System.out.println("I'm " + getOld() + " years old.");
	}
	public void sayWhatIsYourWeight (){
		System.out.println("My weight is " + getWeight());
	}
}
